package com.alibaba.cloud.clinic.api.feign;

import com.alibaba.cloud.clinic.api.vm.MedItemVM;
import com.alibaba.cloud.clinic.api.vm.MedSheetVM;
import com.alibaba.framework.domain.ResponseWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class MedicineServiceFallback implements MedicineServiceFeign {
    private static final Logger LOGGER = LoggerFactory.getLogger(MedicineServiceFallback.class);

    @Override
    public ResponseWrapper<List<MedItemVM>> getAll() {
        LOGGER.info("查询药品列表服务不可用，请稍后再试!");
        return null;
    }

    @Override
    public ResponseWrapper<Integer> deduct(String medCode, Integer medStock) {
        LOGGER.info("药品扣减库存服务不可用，请稍后再试!");
        return null;
    }

    @Override
    public ResponseWrapper<Integer> addMedSheet(MedSheetVM medSheetVM) {
        LOGGER.info("添加药品申请服务不可用，请稍后再试!");
        return null;
    }
}
